<html lang="en" style="font-size: 53.3333px;"><head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>找回密码</title>
    <link rel="stylesheet" type="text/css" href="/static/home/mobile/css/login.css">
        <script type="text/javascript" src="/static/home/mobile/js/jquery.min.js"></script>
    <!-- 弹出层 -->
    <link rel="stylesheet" href="/static/plugins/dialog/css/dialog.css" />
    <link rel="stylesheet" href="/static/home/mobile/css/aui.css" />
    <script src="/static/plugins/dialog/lib/zepto.min.js"></script>
    <script src="/static/plugins/dialog/js/dialog.js"></script>
    <!-- 弹出层 -->
    <script type="text/javascript" src="/static/home/mobile/js/global.js"></script>
<style type="text/css">
    body,html{background:#0f0f0f;}
  .bg{
    background:#0f0f0f;
    height:260px;
    background-image:url(/static/home/mobile/images/login-bg.png);
    background-position:top center;
    background-size:cover;
    background-repeat:no-repeat;
  }
  .main-title{text-align:center;margin-top:50px;font-size:22px;color:#fff;}
  .box-title{text-align:center;margin-top:20px;font-size:28px;color:#fff;}
  .main_box{position:absolute;top:220px;left:10px;right:10px;border-radius:20px;background:#222222;margin-bottom:15px;}
  .con_bg{padding:20px;}
  .con_bg input{border:none;vertical-align: middle;margin-top:15px;background:#222222;color:#fff;}
  .con_bg >span{width:100%;display:inline-block; border-bottom:1px solid #444;padding-left:20px;background-position:left center !important;background-repeat:no-repeat !important;background-size:18px !important;
    padding-bottom:0px !important;
  }
  .con_bg .first_sp{background:url(/static/home/mobile/images/icon-username.png);}
  .con_bg .second_sp{background:url(/static/home/mobile/images/icon-pwd.png);}
  .con_bg .thrid_sp{background:url(/static/home/mobile/images/icon-pwd.png);}

  .con_bg .thrid_sp{display: flex;align-items:center;}
  .con_bg .thrid_sp input{width:70%;}
  .con_bg .thrid_sp #getcode{margin-left:auto;color:#0062CC;font-size:16px;line-height:30px;}
  .log_btn{display:block;background:linear-gradient(to right,#295AFF,#4BAFF9);width:90%;padding:10px 20px;text-align:center;margin:auto;border-radius:30px;margin-bottom:10px;color:#fff;}
  .forget_btn{text-align:center;display:block;margin:30px auto;}
  .bottom{display:block;margin-bottom:20px;text-align:center;}
  .bottom img{width:20px !important;display:inline-block;}
  .read{text-align:center;width:100%;margin-bottom:20px;}
  .read > span{color:#999;padding:15px;font-size:13px;padding-left:20px;
    background:url(/static/home/mobile/images/icon-sel.png);background-position:left center;background-size:16px;background-repeat:no-repeat;display:inline-block;
    margin-top:5px;
  }
  .read.active  > span{background:url(/static/home/mobile/images/icon-sel-active.png);background-position:left center;background-size:16px;background-repeat:no-repeat;display:inline-block;}
</style>
</head>

<body>
  <div class="main_login">
    <div class="bg">
        <header class="aui-bar aui-bar-nav" id="aui-header" style="background: none;">
	        <a class="aui-btn aui-pull-left" tapmode onclick="history.go(-1)">
	            <span class="aui-iconfont aui-icon-left" style="color:#FFF"></span>
	        </a>
	        <div id="title" class="aui-title aui-hide"></div>
	        <a class="aui-btn aui-pull-right" tapmode href="/home/auth/login.html">
               <span class="aui-iconfont aui-icon-gear" style="color:#FFF;font-size:14px;">登陆</span>
            </a>
	    </header>
	    <div class="main-title"></div>
    </div>
    <div class="main_box">
        <div class="box-title">找回密码</div>
        <form id="register_form">
            <div class="con_bg">
                <span class="first_sp"><input id="phones" name="username" type="text" minlength="11" maxlength="11" placeholder="请输入手机号"/></span>
                <span class="thrid_sp"><input id="yzcode" type="number" name="captcha" maxlength="6" placeholder="请输入验证码"/><input value="获取验证码" onclick="getmessage()" id="getCode" style="    margin-top: 0px;text-align: right;"/></span> 
                <span class="second_sp"><input id="password" name="password" type="password" placeholder="请输入密码"></span>
                <span class="second_sp"><input id="password_reg" name="password_confirm" type="password"  placeholder="请确认密码"/></span>
                
            </div>
        </form>
        <a href="#"  class=" js-register log_btn">确定</a>
        <!--<a class="read" style="display:inline-block" tapmode onclick="readClick(this);"><span>已阅读并同意 <font style="color:#4BAFF9" tapmode onclick="fnOpenYingsi(event)">隐私条款和隐私政策</font></span></a>-->
        <!--<a  tapmode onclick="openWin('repass')" class="forget_btn">忘记密码？</a> -->    
    </div>
  
    <script type="text/javascript">
         function getmessage(){
            var phone = $("#phones").val();
             if(!(/^1[345789]\d{9}$/.test(phone))){ 
                     message("手机号码有误，请重填",'',"error");
                    return false; 
                } 
                $("#getCode").removeAttr("disabled");
            $.ajax({
            //几个参数需要注意一下
                type: "POST",//方法类型
                dataType: "json",//预期服务器返回的数据类型
                url: "/home/register/sendsmscode" ,//url   /home/register/sendsmscode
                data: {"mobile":phone},
                success: function (result) {
                    console.log(result);//打印服务端返回的数据(调试用)
                    if (result.type == 'success') {
                         // alert("验证码发送成功，收到后请输入验证码");
                           message("验证码发送成功",'',"success");
        		            
                        time(this);
                    } else {
                        message("验证码发送失败",'',"error");
                    }
                },
                error : function() {
                    alert("异常！");
                }
            });
        }
        


         var wait = 60;
    function time(obj) {
        if(wait==0) {
            $("#getCode").removeAttr("disabled");
            $("#getCode").val("获取短信验证");
            wait = 60;
        }else {
            $("#getCode").attr("disabled","true");
            $("#getCode").val(wait+"秒后重试");
            wait--;
            setTimeout(function() {     //倒计时方法
                time(obj);
            },1000);    //间隔为1s
        }
    }
    </script>

            <script type="text/javascript">
        $(function () {
            //确认注册
            $('.js-register').click(function () {
                $.ajax({
                //几个参数需要注意一下
                type: "POST",//方法类型
                dataType: "json",//预期服务器返回的数据类型
                url: "/home/auth/findpwd" ,//url   /home/register/sendsmscode
                data: $('#register_form').serialize(),
                success: function(res) {
                    $('.yzm img').click();
                    message(res.message,res.redirect,res.type);
                },
                error : function() {
                    alert("异常！");
                }
            });
            });

            //回车登录
            $(document).keyup(function(event){
                if(event.keyCode ==13){
                    $('.js-register').click();
                }
            });
        });
    </script>

</body></html>